<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Class: Vertx::HttpClient
  
    &mdash; Ruby API Doc
  
</title>

  <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  hasFrames = window.top.frames.main ? true : false;
  relpath = '../';
  framesUrl = "../frames.html#!" + escape(window.location.href);
</script>


  <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>


  </head>
  <body>
    <div id="header">
      <div id="menu">
  
    <a href="../_index.html">Index (H)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../Vertx.html" title="Vertx (module)">Vertx</a></span></span>
     &raquo; 
    <span class="title">HttpClient</span>
  

  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="../class_list.html">
      Class List
    </a>
  
    <a class="full_list_link" id="method_list_link"
        href="../method_list.html">
      Method List
    </a>
  
    <a class="full_list_link" id="file_list_link"
        href="../file_list.html">
      File List
    </a>
  
</div>
      <div class="clear"></div>
    </div>

    <iframe id="search_frame"></iframe>

    <div id="content"><h1>Class: Vertx::HttpClient
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">Object</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">Vertx::HttpClient</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
      <dt class="r2">Includes:</dt>
      <dd class="r2"><span class='object_link'><a href="ClientSSLSupport.html" title="Vertx::ClientSSLSupport (module)">ClientSSLSupport</a></span>, <span class='object_link'><a href="SSLSupport.html" title="Vertx::SSLSupport (module)">SSLSupport</a></span>, <span class='object_link'><a href="TCPSupport.html" title="Vertx::TCPSupport (module)">TCPSupport</a></span></dd>
      
    
  
  
  
    <dt class="r1 last">Defined in:</dt>
    <dd class="r1 last">src/main/api_shim/core/http.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    An HTTP client.
A client maintains a pool of connections to a specific host, at a specific port. The HTTP connections can act
as pipelines for HTTP requests.
It is used as a factory for <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">HttpClientRequest</a></span> instances which encapsulate the actual HTTP requests. It is also
used as a factory for <span class='object_link'><a href="WebSocket.html" title="Vertx::WebSocket (class)">WebSockets</a></span>.

  </div>
</div>
<div class="tags">
  
<p class="tag_title">Author:</p>
<ul class="author">
  
    <li>
      
      
      
      
        
        <div class='inline'><a href="http://tfox.org" target="_parent" title="Tim Fox">Tim Fox</a></div>
      
    </li>
  
</ul>

</div>






  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#close-instance_method" title="#close (instance method)">- (Object) <strong>close</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Close the client.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#connect-instance_method" title="#connect (instance method)">- (Object) <strong>connect</strong>(uri, &amp;hndlr) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">HttpClientRequest</a></span> instance which represents an HTTP CONNECT request with the specified uri.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#connect_web_socket-instance_method" title="#connect_web_socket (instance method)">- (Object) <strong>connect_web_socket</strong>(uri, &amp;hndlr) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Attempt to connect a WebSocket to the specified URI.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#delete-instance_method" title="#delete (instance method)">- (Object) <strong>delete</strong>(uri, &amp;hndlr) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">HttpClientRequest</a></span> instance which represents an HTTP DELETE request with the specified uri.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#exception_handler-instance_method" title="#exception_handler (instance method)">- (Object) <strong>exception_handler</strong>(&amp;hndlr) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Set the exception handler.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#get-instance_method" title="#get (instance method)">- (Object) <strong>get</strong>(uri, &amp;hndlr) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">HttpClientRequest</a></span> instance which represents an HTTP GET request with the specified uri.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#get_now-instance_method" title="#get_now (instance method)">- (Object) <strong>get_now</strong>(uri, headers = nil, &amp;hndlr) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>This is a quick version of the <span class='object_link'><a href="#get-instance_method" title="Vertx::HttpClient#get (method)">#get</a></span> method where you do not want to do anything with the request
before sending.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#head-instance_method" title="#head (instance method)">- (Object) <strong>head</strong>(uri, &amp;hndlr) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">HttpClientRequest</a></span> instance which represents an HTTP HEAD request with the specified uri.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#host-instance_method" title="#host (instance method)">- (Object) <strong>host</strong>(val = nil) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Get or set host.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#host%3D-instance_method" title="#host= (instance method)">- (Object) <strong>host=</strong>(val) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Set the host name or ip address that the client will attempt to connect to on the server on.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#initialize-instance_method" title="#initialize (instance method)">- (HttpClient) <strong>initialize</strong> </a>
    

    
  </span>
  
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Create a new HttpClient.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#keep_alive-instance_method" title="#keep_alive (instance method)">- (Object) <strong>keep_alive</strong>(val = nil) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Get or set keep alive.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#keep_alive%3D-instance_method" title="#keep_alive= (instance method)">- (Object) <strong>keep_alive=</strong>(val) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>If val is true then, after the request has ended the connection will be returned to the pool
where it can be used by another request.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#max_pool_size-instance_method" title="#max_pool_size (instance method)">- (Object) <strong>max_pool_size</strong>(val = nil) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Get or set the max pool size.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#max_pool_size%3D-instance_method" title="#max_pool_size= (instance method)">- (Object) <strong>max_pool_size=</strong>(val) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Set the maximum pool size.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#options-instance_method" title="#options (instance method)">- (Object) <strong>options</strong>(uri, &amp;hndlr) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">HttpClientRequest</a></span> instance which represents an HTTP OPTIONS request with the specified uri.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#patch-instance_method" title="#patch (instance method)">- (Object) <strong>patch</strong>(uri, &amp;hndlr) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">HttpClientRequest</a></span> instance which represents an HTTP PATCH request with the specified uri.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#port-instance_method" title="#port (instance method)">- (Object) <strong>port</strong>(val = nil) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Get or set port.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#port%3D-instance_method" title="#port= (instance method)">- (Object) <strong>port=</strong>(val) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Set the port that the client will attempt to connect to on the server on.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#post-instance_method" title="#post (instance method)">- (Object) <strong>post</strong>(uri, &amp;hndlr) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">HttpClientRequest</a></span> instance which represents an HTTP POST request with the specified uri.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#put-instance_method" title="#put (instance method)">- (Object) <strong>put</strong>(uri, &amp;hndlr) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">HttpClientRequest</a></span> instance which represents an HTTP PUT request with the specified uri.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#request-instance_method" title="#request (instance method)">- (Object) <strong>request</strong>(method, uri, &amp;hndlr) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">HttpClientRequest</a></span> instance which represents an HTTP request with the specified method and uri.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#trace-instance_method" title="#trace (instance method)">- (Object) <strong>trace</strong>(uri, &amp;hndlr) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">HttpClientRequest</a></span> instance which represents an HTTP TRACE request with the specified uri.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#verify_host-instance_method" title="#verify_host (instance method)">- (Object) <strong>verify_host</strong>(val = nil) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Get or set verify host.</div></span>
  
</li>

      
    </ul>
  


  
  
  
  
  
  
  
  
  <h3 class="inherited">Methods included from <span class='object_link'><a href="SSLSupport.html" title="Vertx::SSLSupport (module)">SSLSupport</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="SSLSupport.html#key_store_password-instance_method" title="Vertx::SSLSupport#key_store_password (method)">#key_store_password</a></span>, <span class='object_link'><a href="SSLSupport.html#key_store_password%3D-instance_method" title="Vertx::SSLSupport#key_store_password= (method)">#key_store_password=</a></span>, <span class='object_link'><a href="SSLSupport.html#key_store_path-instance_method" title="Vertx::SSLSupport#key_store_path (method)">#key_store_path</a></span>, <span class='object_link'><a href="SSLSupport.html#key_store_path%3D-instance_method" title="Vertx::SSLSupport#key_store_path= (method)">#key_store_path=</a></span>, <span class='object_link'><a href="SSLSupport.html#ssl-instance_method" title="Vertx::SSLSupport#ssl (method)">#ssl</a></span>, <span class='object_link'><a href="SSLSupport.html#ssl%3D-instance_method" title="Vertx::SSLSupport#ssl= (method)">#ssl=</a></span>, <span class='object_link'><a href="SSLSupport.html#trust_store_password-instance_method" title="Vertx::SSLSupport#trust_store_password (method)">#trust_store_password</a></span>, <span class='object_link'><a href="SSLSupport.html#trust_store_password%3D-instance_method" title="Vertx::SSLSupport#trust_store_password= (method)">#trust_store_password=</a></span>, <span class='object_link'><a href="SSLSupport.html#trust_store_path-instance_method" title="Vertx::SSLSupport#trust_store_path (method)">#trust_store_path</a></span>, <span class='object_link'><a href="SSLSupport.html#trust_store_path%3D-instance_method" title="Vertx::SSLSupport#trust_store_path= (method)">#trust_store_path=</a></span></p>

  
  
  
  
  
  
  
  
  <h3 class="inherited">Methods included from <span class='object_link'><a href="ClientSSLSupport.html" title="Vertx::ClientSSLSupport (module)">ClientSSLSupport</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="ClientSSLSupport.html#trust_all-instance_method" title="Vertx::ClientSSLSupport#trust_all (method)">#trust_all</a></span>, <span class='object_link'><a href="ClientSSLSupport.html#trust_all%3D-instance_method" title="Vertx::ClientSSLSupport#trust_all= (method)">#trust_all=</a></span></p>

  
  
  
  
  
  
  
  
  <h3 class="inherited">Methods included from <span class='object_link'><a href="TCPSupport.html" title="Vertx::TCPSupport (module)">TCPSupport</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="TCPSupport.html#receive_buffer_size%3D-instance_method" title="Vertx::TCPSupport#receive_buffer_size= (method)">#receive_buffer_size=</a></span>, <span class='object_link'><a href="TCPSupport.html#reuse_address-instance_method" title="Vertx::TCPSupport#reuse_address (method)">#reuse_address</a></span>, <span class='object_link'><a href="TCPSupport.html#reuse_address%3D-instance_method" title="Vertx::TCPSupport#reuse_address= (method)">#reuse_address=</a></span>, <span class='object_link'><a href="TCPSupport.html#send_buffer_size-instance_method" title="Vertx::TCPSupport#send_buffer_size (method)">#send_buffer_size</a></span>, <span class='object_link'><a href="TCPSupport.html#send_buffer_size%3D-instance_method" title="Vertx::TCPSupport#send_buffer_size= (method)">#send_buffer_size=</a></span>, <span class='object_link'><a href="TCPSupport.html#send_receive_size-instance_method" title="Vertx::TCPSupport#send_receive_size (method)">#send_receive_size</a></span>, <span class='object_link'><a href="TCPSupport.html#so_linger-instance_method" title="Vertx::TCPSupport#so_linger (method)">#so_linger</a></span>, <span class='object_link'><a href="TCPSupport.html#so_linger%3D-instance_method" title="Vertx::TCPSupport#so_linger= (method)">#so_linger=</a></span>, <span class='object_link'><a href="TCPSupport.html#tcp_keep_alive-instance_method" title="Vertx::TCPSupport#tcp_keep_alive (method)">#tcp_keep_alive</a></span>, <span class='object_link'><a href="TCPSupport.html#tcp_keep_alive%3D-instance_method" title="Vertx::TCPSupport#tcp_keep_alive= (method)">#tcp_keep_alive=</a></span>, <span class='object_link'><a href="TCPSupport.html#traffic_class-instance_method" title="Vertx::TCPSupport#traffic_class (method)">#traffic_class</a></span>, <span class='object_link'><a href="TCPSupport.html#traffic_class%3D-instance_method" title="Vertx::TCPSupport#traffic_class= (method)">#traffic_class=</a></span>, <span class='object_link'><a href="TCPSupport.html#use_pooled_buffers-instance_method" title="Vertx::TCPSupport#use_pooled_buffers (method)">#use_pooled_buffers</a></span>, <span class='object_link'><a href="TCPSupport.html#use_pooled_buffers%3D-instance_method" title="Vertx::TCPSupport#use_pooled_buffers= (method)">#use_pooled_buffers=</a></span></p>
<div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <div class="method_details first">
  <h3 class="signature first" id="initialize-instance_method">
  
    - (<tt><span class='object_link'><a href="" title="Vertx::HttpClient (class)">HttpClient</a></span></tt>) <strong>initialize</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Create a new HttpClient

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


92
93
94</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 92</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span>
  <span class='rubyid_@j_del ivar id'>@j_del</span> <span class='assign token'>=</span> <span class='rubyid_org identifier id'>org</span><span class='dot token'>.</span><span class='rubyid_vertx identifier id'>vertx</span><span class='dot token'>.</span><span class='rubyid_java identifier id'>java</span><span class='dot token'>.</span><span class='rubyid_platform identifier id'>platform</span><span class='dot token'>.</span><span class='rubyid_impl identifier id'>impl</span><span class='dot token'>.</span><span class='rubyid_JRubyVerticleFactory constant id'>JRubyVerticleFactory</span><span class='dot token'>.</span><span class='rubyid_vertx identifier id'>vertx</span><span class='dot token'>.</span><span class='rubyid_createHttpClient identifier id'>createHttpClient</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
  
</div>


  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="close-instance_method">
  
    - (<tt>Object</tt>) <strong>close</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Close the client. Any unclosed connections will be closed.

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


291
292
293</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 291</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_close identifier id'>close</span>
  <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_close identifier id'>close</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="connect-instance_method">
  
    - (<tt>Object</tt>) <strong>connect</strong>(uri, &amp;hndlr) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">Vertx::HttpClientRequest</a></span> instance which represents an HTTP CONNECT request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>uri.</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>A relative URI where to perform the CONNECT on the server.</div>
      
    </li>
  
    <li>
      
        <span class='name'>hndlr.</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The handler to be called with the <span class='object_link'><a href="HttpClientResponse.html" title="Vertx::HttpClientResponse (class)">Vertx::HttpClientResponse</a></span></div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


269
270
271</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 269</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_connect identifier id'>connect</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
  <span class='rubyid_HttpClientRequest constant id'>HttpClientRequest</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_connect identifier id'>connect</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='rubyid_resp_handler identifier id'>resp_handler</span><span class='lparen token'>(</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="connect_web_socket-instance_method">
  
    - (<tt>Object</tt>) <strong>connect_web_socket</strong>(uri, &amp;hndlr) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Attempt to connect a WebSocket to the specified URI.
The connect is done asynchronously and the handler is called with a  <span class='object_link'><a href="WebSocket.html" title="Vertx::WebSocket (class)">WebSocket</a></span> on success.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>uri.</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>A relative URI where to connect the WebSocket on the host, e.g. /some/path</div>
      
    </li>
  
    <li>
      
        <span class='name'>hndlr.</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The handler to be called with the <span class='object_link'><a href="WebSocket.html" title="Vertx::WebSocket (class)">WebSocket</a></span></div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


191
192
193
194</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 191</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_connect_web_socket identifier id'>connect_web_socket</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
  <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_connectWebsocket identifier id'>connectWebsocket</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='rubyid_j_ws identifier id'>j_ws</span><span class='bitor op'>|</span> <span class='rubyid_hndlr identifier id'>hndlr</span><span class='dot token'>.</span><span class='rubyid_call identifier id'>call</span><span class='lparen token'>(</span><span class='rubyid_WebSocket constant id'>WebSocket</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_j_ws identifier id'>j_ws</span><span class='rparen token'>)</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span>
  <span class='rubyid_self self kw'>self</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="delete-instance_method">
  
    - (<tt>Object</tt>) <strong>delete</strong>(uri, &amp;hndlr) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">Vertx::HttpClientRequest</a></span> instance which represents an HTTP DELETE request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>uri.</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>A relative URI where to perform the DELETE on the server.</div>
      
    </li>
  
    <li>
      
        <span class='name'>hndlr.</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The handler to be called with the <span class='object_link'><a href="HttpClientResponse.html" title="Vertx::HttpClientResponse (class)">Vertx::HttpClientResponse</a></span></div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


253
254
255</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 253</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_delete identifier id'>delete</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
  <span class='rubyid_HttpClientRequest constant id'>HttpClientRequest</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_delete identifier id'>delete</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='rubyid_resp_handler identifier id'>resp_handler</span><span class='lparen token'>(</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="exception_handler-instance_method">
  
    - (<tt>Object</tt>) <strong>exception_handler</strong>(&amp;hndlr) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Set the exception handler.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>hndlr</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>A block to be used as the handler</div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


98
99
100
101</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 98</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_exception_handler identifier id'>exception_handler</span><span class='lparen token'>(</span><span class='bitand op'>&amp;</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
  <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_exceptionHandler identifier id'>exceptionHandler</span><span class='lparen token'>(</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
  <span class='rubyid_self self kw'>self</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="get-instance_method">
  
    - (<tt>Object</tt>) <strong>get</strong>(uri, &amp;hndlr) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">Vertx::HttpClientRequest</a></span> instance which represents an HTTP GET request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>uri.</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>A relative URI where to perform the GET on the server.</div>
      
    </li>
  
    <li>
      
        <span class='name'>hndlr.</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The handler to be called with the <span class='object_link'><a href="HttpClientResponse.html" title="Vertx::HttpClientResponse (class)">Vertx::HttpClientResponse</a></span></div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


221
222
223</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 221</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_get identifier id'>get</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
  <span class='rubyid_HttpClientRequest constant id'>HttpClientRequest</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_get identifier id'>get</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='rubyid_resp_handler identifier id'>resp_handler</span><span class='lparen token'>(</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="get_now-instance_method">
  
    - (<tt>Object</tt>) <strong>get_now</strong>(uri, headers = nil, &amp;hndlr) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    This is a quick version of the <span class='object_link'><a href="#get-instance_method" title="Vertx::HttpClient#get (method)">#get</a></span> method where you do not want to do anything with the request
before sending.
Normally with any of the HTTP methods you create the request then when you are ready to send it you call
<span class='object_link'><a href="HttpClientRequest.html#end-instance_method" title="Vertx::HttpClientRequest#end (method)">Vertx::HttpClientRequest#end</a></span> on it. With this method the request is immediately sent.
When an HTTP response is received from the server the handler is called passing in the response.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>uri.</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>A relative URI where to perform the GET on the server.</div>
      
    </li>
  
    <li>
      
        <span class='name'>headers.</span>
      
      
        <span class='type'>(<tt>Hash</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>A Hash of headers to pass with the request.</div>
      
    </li>
  
    <li>
      
        <span class='name'>hndlr.</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The handler to be called with the <span class='object_link'><a href="HttpClientResponse.html" title="Vertx::HttpClientResponse (class)">Vertx::HttpClientResponse</a></span></div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


204
205
206
207</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 204</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_get_now identifier id'>get_now</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='rubyid_headers identifier id'>headers</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
  <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_getNow identifier id'>getNow</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='rubyid_headers identifier id'>headers</span><span class='comma token'>,</span> <span class='rubyid_resp_handler identifier id'>resp_handler</span><span class='lparen token'>(</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
  <span class='rubyid_self self kw'>self</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="head-instance_method">
  
    - (<tt>Object</tt>) <strong>head</strong>(uri, &amp;hndlr) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">Vertx::HttpClientRequest</a></span> instance which represents an HTTP HEAD request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>uri.</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>A relative URI where to perform the HEAD on the server.</div>
      
    </li>
  
    <li>
      
        <span class='name'>hndlr.</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The handler to be called with the <span class='object_link'><a href="HttpClientResponse.html" title="Vertx::HttpClientResponse (class)">Vertx::HttpClientResponse</a></span></div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


229
230
231</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 229</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_head identifier id'>head</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
  <span class='rubyid_HttpClientRequest constant id'>HttpClientRequest</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_head identifier id'>head</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='rubyid_resp_handler identifier id'>resp_handler</span><span class='lparen token'>(</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="host-instance_method">
  
    - (<tt>Object</tt>) <strong>host</strong>(val = nil) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Get or set host

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


168
169
170
171
172
173
174
175</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 168</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_host identifier id'>host</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
  <span class='rubyid_if if kw'>if</span> <span class='rubyid_val identifier id'>val</span>
    <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_setHost identifier id'>setHost</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='rparen token'>)</span>
    <span class='rubyid_self self kw'>self</span>
  <span class='rubyid_else else kw'>else</span>
    <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_getHost identifier id'>getHost</span>
  <span class='rubyid_end end kw'>end</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="host=-instance_method">
  
    - (<tt>Object</tt>) <strong>host=</strong>(val) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Set the host name or ip address that the client will attempt to connect to on the server on.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>host.</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The host name or ip address to connect to.</div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


162
163
164
165</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 162</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_host= identifier id'>host=</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='rparen token'>)</span>
  <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_setHost identifier id'>setHost</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='rparen token'>)</span>
  <span class='rubyid_self self kw'>self</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="keep_alive-instance_method">
  
    - (<tt>Object</tt>) <strong>keep_alive</strong>(val = nil) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Get or set keep alive

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


134
135
136
137
138
139
140
141</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 134</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_keep_alive identifier id'>keep_alive</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
  <span class='rubyid_if if kw'>if</span> <span class='rubyid_val identifier id'>val</span>
    <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_setKeepAlive identifier id'>setKeepAlive</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='rparen token'>)</span>
    <span class='rubyid_self self kw'>self</span>
  <span class='rubyid_else else kw'>else</span>
    <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_isKeepAlive identifier id'>isKeepAlive</span>
  <span class='rubyid_end end kw'>end</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="keep_alive=-instance_method">
  
    - (<tt>Object</tt>) <strong>keep_alive=</strong>(val) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    If val is true then, after the request has ended the connection will be returned to the pool
where it can be used by another request. In this manner, many HTTP requests can be pipe-lined over an HTTP connection.
Keep alive connections will not be closed until the <span class='object_link'><a href="#close-instance_method" title="Vertx::HttpClient#close (method)">#close</a></span> method is invoked.
If val is false then a new connection will be created for each request and it won't ever go in the pool,
the connection will closed after the response has been received. Even with no keep alive, the client will not allow more
than <span class='object_link'><a href="#max_pool_size-instance_method" title="Vertx::HttpClient#max_pool_size (method)">#max_pool_size</a></span> connections to be created at any one time.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>val.</span>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The value to use for keep_alive</div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


128
129
130
131</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 128</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_keep_alive= identifier id'>keep_alive=</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='rparen token'>)</span>
  <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_setTCPKeepAlive identifier id'>setTCPKeepAlive</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='rparen token'>)</span>
  <span class='rubyid_self self kw'>self</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="max_pool_size-instance_method">
  
    - (<tt>Object</tt>) <strong>max_pool_size</strong>(val = nil) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Get or set the max pool size

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


112
113
114
115
116
117
118
119</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 112</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_max_pool_size identifier id'>max_pool_size</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
  <span class='rubyid_if if kw'>if</span> <span class='rubyid_val identifier id'>val</span>
    <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_setMaxPoolSize identifier id'>setMaxPoolSize</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='rparen token'>)</span>
    <span class='rubyid_self self kw'>self</span>
  <span class='rubyid_else else kw'>else</span>
    <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_getMaxPoolSize identifier id'>getMaxPoolSize</span>
  <span class='rubyid_end end kw'>end</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="max_pool_size=-instance_method">
  
    - (<tt>Object</tt>) <strong>max_pool_size=</strong>(val) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Set the maximum pool size.
The client will maintain up to this number of HTTP connections in an internal pool

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>val.</span>
      
      
        <span class='type'>(<tt>FixNum</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The maximum number of connections (default to 1).</div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


106
107
108
109</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 106</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_max_pool_size= identifier id'>max_pool_size=</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='rparen token'>)</span>
  <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_setMaxPoolSize identifier id'>setMaxPoolSize</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='rparen token'>)</span>
  <span class='rubyid_self self kw'>self</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="options-instance_method">
  
    - (<tt>Object</tt>) <strong>options</strong>(uri, &amp;hndlr) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">Vertx::HttpClientRequest</a></span> instance which represents an HTTP OPTIONS request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>uri.</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>A relative URI where to perform the OPTIONS on the server.</div>
      
    </li>
  
    <li>
      
        <span class='name'>hndlr.</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The handler to be called with the <span class='object_link'><a href="HttpClientResponse.html" title="Vertx::HttpClientResponse (class)">Vertx::HttpClientResponse</a></span></div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


213
214
215</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 213</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_options identifier id'>options</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
  <span class='rubyid_HttpClientRequest constant id'>HttpClientRequest</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='rubyid_resp_handler identifier id'>resp_handler</span><span class='lparen token'>(</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="patch-instance_method">
  
    - (<tt>Object</tt>) <strong>patch</strong>(uri, &amp;hndlr) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">Vertx::HttpClientRequest</a></span> instance which represents an HTTP PATCH request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>uri.</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>A relative URI where to perform the PATCH on the server.</div>
      
    </li>
  
    <li>
      
        <span class='name'>hndlr.</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The handler to be called with the <span class='object_link'><a href="HttpClientResponse.html" title="Vertx::HttpClientResponse (class)">Vertx::HttpClientResponse</a></span></div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


277
278
279</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 277</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_patch identifier id'>patch</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
  <span class='rubyid_HttpClientRequest constant id'>HttpClientRequest</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_patch identifier id'>patch</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='rubyid_resp_handler identifier id'>resp_handler</span><span class='lparen token'>(</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="port-instance_method">
  
    - (<tt>Object</tt>) <strong>port</strong>(val = nil) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Get or set port

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


151
152
153
154
155
156
157
158</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 151</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_port identifier id'>port</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
  <span class='rubyid_if if kw'>if</span> <span class='rubyid_val identifier id'>val</span>
    <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_setPort identifier id'>setPort</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='rparen token'>)</span>
    <span class='rubyid_self self kw'>self</span>
  <span class='rubyid_else else kw'>else</span>
    <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_getPort identifier id'>getPort</span>
  <span class='rubyid_end end kw'>end</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="port=-instance_method">
  
    - (<tt>Object</tt>) <strong>port=</strong>(val) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Set the port that the client will attempt to connect to on the server on. The default value is 80

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>val.</span>
      
      
        <span class='type'>(<tt>FixNum</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The port value.</div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


145
146
147
148</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 145</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_port= identifier id'>port=</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='rparen token'>)</span>
  <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_setPort identifier id'>setPort</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='rparen token'>)</span>
  <span class='rubyid_self self kw'>self</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="post-instance_method">
  
    - (<tt>Object</tt>) <strong>post</strong>(uri, &amp;hndlr) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">Vertx::HttpClientRequest</a></span> instance which represents an HTTP POST request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>uri.</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>A relative URI where to perform the POST on the server.</div>
      
    </li>
  
    <li>
      
        <span class='name'>hndlr.</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The handler to be called with the <span class='object_link'><a href="HttpClientResponse.html" title="Vertx::HttpClientResponse (class)">Vertx::HttpClientResponse</a></span></div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


237
238
239</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 237</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_post identifier id'>post</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
  <span class='rubyid_HttpClientRequest constant id'>HttpClientRequest</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_post identifier id'>post</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='rubyid_resp_handler identifier id'>resp_handler</span><span class='lparen token'>(</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="put-instance_method">
  
    - (<tt>Object</tt>) <strong>put</strong>(uri, &amp;hndlr) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">Vertx::HttpClientRequest</a></span> instance which represents an HTTP PUT request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>uri.</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>A relative URI where to perform the PUT on the server.</div>
      
    </li>
  
    <li>
      
        <span class='name'>hndlr.</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The handler to be called with the <span class='object_link'><a href="HttpClientResponse.html" title="Vertx::HttpClientResponse (class)">Vertx::HttpClientResponse</a></span></div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


245
246
247</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 245</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_put identifier id'>put</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
  <span class='rubyid_HttpClientRequest constant id'>HttpClientRequest</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_put identifier id'>put</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='rubyid_resp_handler identifier id'>resp_handler</span><span class='lparen token'>(</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="request-instance_method">
  
    - (<tt>Object</tt>) <strong>request</strong>(method, uri, &amp;hndlr) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">Vertx::HttpClientRequest</a></span> instance which represents an HTTP request with the specified method and uri.
When an HTTP response is received from the server the handler is called passing in the response.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>method.</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The HTTP method. Can be one of OPTIONS, HEAD, GET, POST, PUT, DELETE, TRACE, CONNECT.</div>
      
    </li>
  
    <li>
      
        <span class='name'>uri.</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>A relative URI where to perform the OPTIONS on the server.</div>
      
    </li>
  
    <li>
      
        <span class='name'>hndlr.</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The handler to be called with the <span class='object_link'><a href="HttpClientResponse.html" title="Vertx::HttpClientResponse (class)">Vertx::HttpClientResponse</a></span></div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


286
287
288</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 286</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_request identifier id'>request</span><span class='lparen token'>(</span><span class='rubyid_method identifier id'>method</span><span class='comma token'>,</span> <span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
  <span class='rubyid_HttpClientRequest constant id'>HttpClientRequest</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_request identifier id'>request</span><span class='lparen token'>(</span><span class='rubyid_method identifier id'>method</span><span class='comma token'>,</span> <span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='rubyid_resp_handler identifier id'>resp_handler</span><span class='lparen token'>(</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="trace-instance_method">
  
    - (<tt>Object</tt>) <strong>trace</strong>(uri, &amp;hndlr) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    This method returns an <span class='object_link'><a href="HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">Vertx::HttpClientRequest</a></span> instance which represents an HTTP TRACE request with the specified uri.
When an HTTP response is received from the server the handler is called passing in the response.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>uri.</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>A relative URI where to perform the TRACE on the server.</div>
      
    </li>
  
    <li>
      
        <span class='name'>hndlr.</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The handler to be called with the <span class='object_link'><a href="HttpClientResponse.html" title="Vertx::HttpClientResponse (class)">Vertx::HttpClientResponse</a></span></div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


261
262
263</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 261</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_trace identifier id'>trace</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
  <span class='rubyid_HttpClientRequest constant id'>HttpClientRequest</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_trace identifier id'>trace</span><span class='lparen token'>(</span><span class='rubyid_uri identifier id'>uri</span><span class='comma token'>,</span> <span class='rubyid_resp_handler identifier id'>resp_handler</span><span class='lparen token'>(</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="verify_host-instance_method">
  
    - (<tt>Object</tt>) <strong>verify_host</strong>(val = nil) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Get or set verify host

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


178
179
180
181
182
183
184
185</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/http.rb', line 178</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_verify_host identifier id'>verify_host</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
  <span class='rubyid_if if kw'>if</span> <span class='rubyid_val identifier id'>val</span>
    <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_setVerifyHost identifier id'>setVerifyHost</span><span class='lparen token'>(</span><span class='rubyid_val identifier id'>val</span><span class='rparen token'>)</span>
    <span class='rubyid_self self kw'>self</span>
  <span class='rubyid_else else kw'>else</span>
    <span class='rubyid_@j_del ivar id'>@j_del</span><span class='dot token'>.</span><span class='rubyid_isVerifyHost identifier id'>isVerifyHost</span>
  <span class='rubyid_end end kw'>end</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

    <div id="footer">
  Generated on Wed Jul 17 20:30:35 2013 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.8.6.1 (ruby-1.9.3).
</div>

  </body>
</html>